<%@ page contentType="text/html; charset=utf-8"  pageEncoding="utf-8"%>
<%@ page language="java"%>
<%@ include file="/common/taglibs.jsp"%>
<s:if test="contentAttach!=null&&contentAttach.contentType!=null">
<s:if test="contentAttach.contentType.equals(\"content\")">
    <table class="listgrid" id="listbox" class="articlelisttb">
			<tbody>
				<tr>
					<th  style="text-align: center;"><s:text name="contentAttach.attachName"/></th>
					<th  style="text-align: center;"><s:text name="contentAttach.attachSize"/></th>
					<th  style="text-align: center;"><s:text name="contentAttach.attachMemo"/></th>
					<th  style="text-align: center;">上传进度</th>
					<th  style="text-align: center;"><s:text name="operate"/></th>
				</tr>
				<s:iterator value="page.result">
					<s:if test="(\"0\").equals(attachType)">
					<input type="hidden" value="<s:property value="attachId"/>" name="attachId"/>
					<input type="hidden" value="<s:property value='content.contentId'/>" name="contentId"/>
					<tr>
					<td><a href="<s:property value="uploadUrl"/><s:property value="attachUrl"/>" target="_blank"><s:property value="attachName"/></a>&nbsp;</td>
					<td><s:property value="attachSize"/>&nbsp;KB</td>
					<td><input type="text" name="contentAttach.attachMemo" Class="txtin" value="<s:property value="attachMemo"/>"/>&nbsp;</td>
					<td>
						<s:if test="-1==attachDownloadNum">
							<span class="progressBar" id="pb2"></span>
						</div>
						</s:if>
						<s:else><img width="120" title=" 100%" alt=" 0%" src="../images/progressbar.gif" style="width: 120px; height: 12px; background-image: url(&quot;../images/progressbg_red.gif&quot;); background-position: 0px 50%; padding: 0pt; margin: 0pt;"><span id="pb2_pbText"> 100%</span></s:else>
					</td>
						<td>
							<a href="#this" onclick="inFile('<s:property value="uploadUrl"/><s:property value="attachUrl"/>','<s:property value="attachName"/>')">插入</a><tt>|</tt>
						    <a href="#this" onclick="delFile('<s:property value="attachId"/>','content')"><s:text name="delete"/></a>
						</td>
					</tr>
					</s:if>
				</s:iterator>
			</tbody>
		</table>
    <br><br>
</s:if>
<s:if test="contentAttach.contentType.equals(\"flash\")">
	<script type="text/javascript">
	$("#uploads",window.parent.document).show();
	$("#before",window.parent.document).hide();
	</script>
	<table class="addgrid">
			<tbody>
	<tr>
	<s:if test="page.result.size<1">
		<div class="loadtit">只可上传一个动画<span class="colorr">（单个文件上传大小不能超过20M）</span></div>
					<div class="loadmain">

						<div class="loadway">
							<input type="button" class="loadwayfla" onclick="up()" onmousemove="document.getElementById('bester').style.pixelLeft=event.x-60;document.getElementById('bester').style.pixelTop=event.y-10;"/>
							<p>（文件格式必须为flv）</p>
						</div>
					</div>
	</s:if><s:else>
	<s:iterator value="page.result">
	<input type="hidden" value="@1@"/>
	<s:hidden name="attachId"/>
	<input type="hidden" value="<s:property value='content.contentId'/>" name="contentId"/>
	<td>
		<div class="loadtit">只可上传一个动画<span class="colorr">（单个文件上传大小不能超过20M）</span></div>
		<div class="loadavip">提示：动画已上传成功</div>
		<div class="loadavilist">
			<div class="loadavipic fl">
				<dt><img src="${ctx}/images/loadavi.gif" /><a href="#" class="loadpicedit"/>&nbsp;</a>
				<s:if test="-1==attachDownloadNum">
				<div class="loadingb" id="loading">
					<div class="bar"><span><p><tt></tt></p></span><div id="percent">0%</div></div>
					<div id="marker"></div>
				</div>
				</s:if>
				</dt>
			</div>
			<div class="loadavinews fl">
				<span><tt><s:property value="attachName"/>&nbsp;</tt><s:property value="attachSize"/>&nbsp;KB</span>
				<span><input type="text" name="contentAttach.attachMemo" Class="txtin" value="<s:property value="attachMemo"/>"/>&nbsp;</span>
				<span><a href="#this" onclick="delFile('<s:property value="attachId"/>','flash')" class="loadpicbtn">删除</a></span>

			</div>
		</div>
		<div class="clear"></div>
	</td>
	</s:iterator>
	</s:else>
	</tr>
	</tbody>
	</table>
</s:if>
<s:if test="contentAttach.contentType.equals(\"video\")">
<script type="text/javascript">
	$("#uploads",window.parent.document).show();
	$("#before",window.parent.document).hide();
	</script>
	<table class="addgrid">
			<tbody>
	<tr>
	<s:if test="page.result.size<1">
		<div class="loadtit">只可上传一个视频<span class="colorr">（单个文件上传大小不能超过20M）</span></div>
					<div class="loadmain">

						<div class="loadway">
							<input type="button" class="loadwayavi" onclick="up()" onmousemove="document.getElementById('bester').style.pixelLeft=event.x-60;document.getElementById('bester').style.pixelTop=event.y-10;"/>
							<p>（文件格式必须为wmv/asx）</p>
						</div>
					</div>
	</s:if><s:else>
	<s:iterator value="page.result">
	<input type="hidden" value="@1@"/>
	<s:hidden name="attachId"/>
	<input type="hidden" value="<s:property value='content.contentId'/>" name="contentId"/>
	<td>
		<div class="loadtit">只可上传一个视频<span class="colorr">（单个文件上传大小不能超过20M）</span></div>
		<div class="loadavip">提示：视频已上传成功</div>
		<div class="loadavilist">
			<div class="loadavipic fl">
				<dt><img src="${ctx}/images/loadavi.gif" /><a href="#" class="loadpicedit"/>&nbsp;</a>
				<s:if test="-1==attachDownloadNum">
				<div class="loadingb" id="loading">
					<div class="bar"><span><p><tt></tt></p></span><div id="percent">0%</div></div>
					<div id="marker"></div>
				</div>
				</s:if>
				</dt>
			</div>
			<div class="loadavinews fl">
				<span><tt><s:property value="attachName"/>&nbsp;</tt><s:property value="attachSize"/>&nbsp;KB</span>
				<span><input type="text" name="contentAttach.attachMemo" Class="txtin" value="<s:property value="attachMemo"/>"/>&nbsp;</span>
				<span><a href="#this" onclick="delFile('<s:property value="attachId"/>','video')" class="loadpicbtn">删除</a></span>

			</div>
		</div>
		<div class="clear"></div>
	</td>
	</s:iterator>
	</s:else>
	</tr>
	</tbody>
	</table>
</s:if>
<s:if test="contentAttach.contentType.equals(\"software\")">
<script type="text/javascript">
	$("#uploads",window.parent.document).show();
	$("#before",window.parent.document).hide();
	</script>
	<table class="addgrid">
			<tbody>
	<tr>
	<s:if test="page.result.size<1">
		<div class="loadtit">只可上传一个软件<span class="colorr">（单个文件上传大小不能超过20M）</span></div>
					<div class="loadmain">

						<div class="loadway">
							<input type="button"  class="loadwayrar" onclick="up()" onmousemove="document.getElementById('bester').style.pixelLeft=event.x-60;document.getElementById('bester').style.pixelTop=event.y-10;"/>
							<p>（文件格式必须为rar/zip）</p>
						</div>
					</div>
	</s:if><s:else>
	<s:iterator value="page.result">
	<input type="hidden" value="@1@"/>
	<s:hidden name="attachId"/>
	<input type="hidden" value="<s:property value='content.contentId'/>" name="contentId"/>
	<td>
		<div class="loadtit">只可上传一个软件<span class="colorr">（单个文件上传大小不能超过20M）</span></div>
		<div class="loadavip">提示：软件已上传成功</div>
		<div class="loadavilist">
			<div class="loadavipic fl">
				<dt><img id="softPic" src="${ctx}/images/loadavi.gif" /><a href="#" class="loadpicedit"/>&nbsp;</a>
				<s:if test="-1==attachDownloadNum">
				<div class="loadingb" id="loading">
					<span class="progressBar" id="pb2"></span>
				</div>
				</s:if>
				</dt>
			</div>
			<div class="loadavinews fl">
				<span><tt>软件名称：<s:property value="attachName"/>&nbsp;</tt>软件大小：<s:property value="attachSize"/>&nbsp;KB</span>
				<span>备注：<input type="text" name="attachMemo" Class="txtin" value="<s:property value="attachMemo"/>"/>&nbsp;</span>
				<span><a href="#this" onclick="delFile('<s:property value="attachId"/>','software')" class="loadpicbtn">删除</a></span>
			</div>
		</div>
		<div class="clear"></div>
	</td>
	</s:iterator>
	</s:else>
	</tr>
	</tbody>
	</table>
</s:if>
<s:if test="contentAttach.contentType.equals(\"picture\")">
	<script type="text/javascript">
	$("#uploads",window.parent.document).show();
	$("#before",window.parent.document).hide();
	</script>
	<table class="addgrid">
			<tbody>
	<tr>
				<td class="clearpm">
					<div class="loadpictit">
					<font class="loadpica" onclick="up1()" onmousemove="$('input[name=uploadType]').val(1);document.getElementById('bester').style.pixelLeft=event.x-60;document.getElementById('bester').style.pixelTop=event.y-10;">继续添加单照</font>
					<font class="loadpicaz" onclick="up2()" onmousemove="$('input[name=uploadType]').val(2);document.getElementById('bester').style.pixelLeft=event.x-60;document.getElementById('bester').style.pixelTop=event.y-10;">继续添加压缩包</font>
					</div>

					<div class="loadedit">
						<input type="checkbox" id="checkallPic" name="checkallPic" onclick="checkAllPic()"/><label for="checkallPic">全选</label>
						<label><a href="#this" onclick="inFile('<s:property value="uploadUrl"/>')" class="loadpicbtn">插入</a>
							   <a href="#this" id="edit" class="loadpicbtn" onclick="editPic()">编辑</a>
							   <a href="#this" class="loadpicbtn" onclick="deletePic()">删除</a>
							   <a href="#this" class="loadpicbtn" onclick="setFocusPic()">设为焦点</a>
					   </label>
					</div>
					<div class="loadpiclist" id="loadPictureList">
						<s:iterator value="page.result">
						<s:if test="attachType==0">
						<input type="hidden" value="@1@"/>
						<s:hidden name="attachId"/>
						<input type="hidden" value="<s:property value='content.contentId'/>" name="contentId"/>
						<dl>
							<s:if test="-1==attachDownloadNum">
							<dt><img src="${ctx}/images/ajax-loader.gif" style="width: 104px;height: 20px; margin-top:30px; _margin-top:40px"/>
							</s:if>
							<s:else>
							<dt><img src="<s:property value="uploadUrl"/><s:property value="attachUrl"/>" style="width: 104px;height: 90px"/>
							</s:else>
							</dt>
							<dd><input type="checkbox" id="<s:property value="attachId"/>" name="pic" /> &nbsp;
							<s:if test="focusPic"><font color='red' name='focus_mark'>焦</font></s:if>	
								<label for="<s:property value="attachId"/>"><s:property value="attachName"/></label>														
							</dd>
						</dl>
						</s:if>
						</s:iterator>
						<div class="clear" ></div>
					</div>
				</td>
				</tr>
				</tbody>
				</table>
</s:if>
</s:if>